package com.zb.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zb.annotation.NumberPattern;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Author WEN
 * @Date 2023/9/13 0013
 **/
@Data
@ApiModel("工单费用项目对象")
public class WorkFeeProjectVo {
    @ApiModelProperty(value = "费用项目ID，新增不必传，修改必传")
    private Long id;

    @NotBlank(message = "费用项目名称不能为空")
    @Length(max = 10, message = "费用项目名称长度限制 10 个字符以内")
    @ApiModelProperty(value = "费用名称", required = true)
    private String name;

    @NotNull(message = "费用金额不能为空")
    @NumberPattern(regexp = VerificUtil.FLOATING_NUMBER_10_2, required = true, message = "费用金额最多允许输入8位整数，两位小数")
    @ApiModelProperty(value = "费用金额", required = true, example = "1.0")
    private BigDecimal price;

    @NotNull(message = "允许修改金额项不能为空")
    @ApiModelProperty(value = "是否允许修改金额：false-不允许，true-允许", required = true, example = "false")
    private Boolean updatePrice;

    @NotNull(message = "费用项目状态不能为空")
    @ApiModelProperty(value = "费用项目状态：false-启用，true-禁用")
    private Boolean status;
}
